﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="List.aspx.cs" Inherits="ExtSite.List" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script src="JS/global.js" type="text/javascript"></script>

    <script src="JS/Search.js" type="text/javascript"></script>

    <script src="JS/list.js" type="text/javascript"></script>

    <script type="text/javascript">
        function onCommand(column, command, record, recordIndex, cellIndex) {
            if (command == 'RowCommand') {
                window.OpenWin('Card.aspx?ob=' + column.commands[0].card + '&id=' + record.get(column.commands[0].rowid));
             }
            
        };
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManagerMain" runat="server" />
    <ext:Viewport Layout="VBoxLayout" runat="server" ID="ViewPortMain">
        <LayoutConfig>
            <ext:VBoxLayoutConfig Align="Stretch" />
        </LayoutConfig>
        <Items>
            <ext:Toolbar runat="server" ID="ToolbarMain" Height="30">
                <Items>
                    <ext:Button ID="tbarInsert" runat="server" Text="New" Icon="PageAdd">
                        <Listeners>
                            <Click Handler="#{stoList}.insert(0, {}); #{grdList}.editingPlugin.startEditByPosition({row:0, column:1});" />
                        </Listeners>
                    </ext:Button>
                    <ext:Button ID="tbarDelete" runat="server" Text="Delete" Icon="Delete">
                        <Listeners>
                            <Click Handler="if (#{grdList}.hasSelection()) {
                                               #{grdList}.deleteSelected();
                                               #{tbarSave}.fireEvent('Click');
                                            }" />
                        </Listeners>
                    </ext:Button>
                    <ext:Button ID="tbarSave" Text="Save" runat="server" Icon="Disk">
                        <Listeners>
                            <Click Handler="#{stoList}.sync();" />
                        </Listeners>
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </Items>
    </ext:Viewport>
    </form>
</body>
</html>
